<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title> - 选课学生列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <!-- jqgrid-->
    <link href="css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
    <style>
        td{
            text-align: center;
        }

        th{
            text-align: center;
        }

        .form-group{
            margin-top: 10px;
            overflow: hidden;
        }
    </style>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">


    <div id="loading" class="ibox-content">
        <div class="spiner-example">
            <div class="sk-spinner sk-spinner-wave">
                <div class="sk-rect1"></div>
                <div class="sk-rect2"></div>
                <div class="sk-rect3"></div>
                <div class="sk-rect4"></div>
                <div class="sk-rect5"></div>
            </div>
        </div>
        <p id="jindu" style="text-align: center;">数据加载中...</p>
    </div>



    <div class="row">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>学生id</th>
                <th>学生姓名</th>
                <th>学生手机</th>
                <th>选择时间</th>
            </tr>
            </thead>
            <tbody id="table">
            <!--<tr>-->
                <!--<td>Tanmay</td>-->
                <!--<td>Bangalore</td>-->
                <!--<td>560001</td>-->
            <!--</tr>-->
            </tbody>
        </table>
    </div>
</div>


<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>
<!-- jqGrid -->
<script src="js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
<script src="js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
<script src="js/plugins/toastr/toastr.min.js"></script>
<script src="js/zhangyue5.4.js"></script>

</body>
<script>

    const kid = window.location.href.split('kid=')[1];
    if(!kid || kid==""){
        window.location.href='kecheng_list.html';
    }
    shuju.set('kid',kid);
    shuju.set('method','getxuanke');
    shuju.getshuju('kecheng',{
        success:function(data){
            if(data.code==200){
                let info = data.data;
                let html = [];
                for(let i=0;i<info.length;i++){
                    html.push(gethtml(info[i]));
                }
                document.getElementById('table').innerHTML=html.join('');
                document.getElementById('loading').style.display='none';
            }
        },
        error:function(e){

        }
    });


    var gethtml=function(obj){
        return `
                  <tr>
                     <td>${obj.id}</td>
                     <td>${obj.name}</td>
                     <td>${obj.phone}</td>
                     <td>${obj.shijian}</td>
                  </tr>
                `
    };



</script>

</html>